using System;
using System.Linq;
using Ninject.Activation;
using Ninject.Activation.Providers;
using Ninject.Planning;
using Ninject.Planning.Directives;
using Ninject.Selection.Heuristics;

namespace ninject.configurer
{
    public class BaseConfigurationProvider : StandardProvider
    {
        public BaseConfigurationProvider(Type type, IPlanner planner, IConstructorScorer scorer)
            : base(type, planner, scorer)
        {
        }

        // We need to score configuration constructors differently than traditional constructors.
        // By default, the constructor with the most parameters wins. If you want to score the
        // constructors differently, swap out this Func for your own.
        public static Func<IContext, ConstructorInjectionDirective, int> ConfigurationScorer =
            (context, option) => option.Targets.Count();

    }
}